import React, { Component } from 'react'

// 导入样式
// import './index.scss'
import styles from './index.module.css'

import NavHeader from '../../components/NavHeader';

export default class Map extends Component {
  componentDidMount() {
    // 初始化地图实例
    const map = new window.BMapGL.Map("container");
    // 设置中心点
    const point = new window.BMapGL.Point(116.404, 39.915);
    // 地图初始化
    map.centerAndZoom(point, 15); 
  }

  render() {
    return (
      <div className={styles.map}>
      {/* <div className="map"> */}
        {/* 顶部导航栏 */}
        <NavHeader >地图找房</NavHeader>

        {/* 地图容器 */}
        <div id="container" className={styles.container} />
        {/* <div id="container" /> */}
      </div>
    )
  }
}
